SYS.MEM.ALLOC
0x0000
NET.UPLINK
ESTABLISHING
SEC.PROTOCOL
AWAITING
DATA.STREAM
0.0.0.0
0%
INITIALIZING SYSTEM
[
]
Portfolio Learn Month 02 Networking Basics

🔍 Day 22: SMB Enumeration (Continued)

Networking Exploitation SSH

The hunt continues. From a simple file share to a full system compromise, this session demonstrates the power of persistence and lateral movement. 🚩


🔑 3. The SSH Key Discovery

Inside the share, I found a text file mentioning that John Cactus has office timings on SSH. I found a hidden directory called .ssh.


💻 4. Connecting via SSH

After exiting the SMB client, I had to prepare the private key for the connection.

Step A: Changing Permissions

I ran chmod 600 id_rsa.

Step B: The Connection

I used the -i flag to tell SSH to use my downloaded private key instead of a password.

Command:

ssh -i id_rsa cactus@[TARGET_IP]

Note: We always use the private key for the connection. The username cactus was found inside the public key file earlier.


🚩 The Final Result

Boom! The connection was successful. Once inside the server, I found the file, used the cat command to read it, and obtained the FLAG 🚩.